#if defined(_MSC_VER)
#pragma once
#endif

#ifndef LM_SAMPLER_LOWDISCREPANCY_H
#define LM_SAMPLER_LOWDISCREPANCY_H

#include "../core/sampler.h"

class LDSampler : public Sampler {
public:
	LDSampler(int xstart, int xend, int ystart, int yend, int spp, bool lns, bool ts);
	~LDSampler();
	int GetMoreSamples(Sample *sample);
	int MaximumSampleCount() {
		return nPixelSamples;
	}
	int RoundSize(int size) const {
		return RoundUpPow2(size);
	}
	Sampler *GetSubSampler(int num, int count);
private:
	int xPos, yPos;
	int nPixelSamples;
	float *imageSamples;
	float *lensSamples;
	float *timeSamples;
	float **oneDSamples;
	float **twoDSamples;
	int n1d,n2d;
	RNG *rng;
};

#endif	// LM_SAMPLER_LOWDISCREPANCY_H